/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import gestionform.GestionDeconnexion;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;;

/**
 *
 * @author Paul
 */
public class Deconnexion extends HttpServlet {

    public static final String VUE_CONNEXION = "/view/connexion.jsp";
    public static final String ATT_GESTION_DECONNEXION = "gDeconnexion";

    /**
     *
     * @param request
     * @param response
     * @throws ServletException
     * @throws IOException
     */
    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        GestionDeconnexion gDeconnexion = new GestionDeconnexion();
        gDeconnexion.deconnecterUtilisateur(request);
        request.setAttribute(ATT_GESTION_DECONNEXION, gDeconnexion);
        this.getServletContext().getRequestDispatcher(VUE_CONNEXION).forward(request, response);
    }
}
